package com.example.demo.account.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.account.entity.TblAccount;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zgq
 * @since 2020-12-07
 */
public interface TblAccountMapper extends BaseMapper<TblAccount> {

    @Update("update account_tbl set money=money-#{money} where userId=#{userId}")
    int decAccount(@Param("userId") String userId, @Param("money") int money);
}
